package com.boot.mapper;

import com.boot.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

//@Mapper:这是给Spring扫描的 Spring会扫描到生成UserMapper的bean对象
@Mapper
public interface UserMapper {

    List<User> list();

    List<User> getByUserNameAndPassword(@Param("userName") String userName, @Param("password") String password);

    int deleteById(Long id);

    User getById(Long id);

    int updateById(User user);

    int save(User user);

}

